<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <script type="text/javascript" src="js/jquery-1.12.4.js"></script>

    <script type="text/javascript">
        $(function () {
            $('#btn').click(function () {
                /* $('.box').fadeOut() */
                /*                 $('.box').fadeToggle(500, 'swing', function() {
                                    alert("Ok");
                                }); */

                /* $('.box').show(); */
                /* $('.box').toggle(); */
                /* $('.box').slideDown(); */
                $('.box').slideToggle(1000, function () {
                    alert("OK");
                });



            });
        });
    </script>


    <style type="text/css">
        .box {
            width: 300px;
            height: 300px;
            background-color: gold;
            display: none;
        }
    </style>
    <title>Document</title>
</head>

<body>
    <input type="button" value="按钮" id="btn">
    <div class="box"></div>

</body>

</html>